<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var [a,b,c] = [1,2,3]
        console.log(a,b,c) 
        
        var {aa,bb,cc} = {aa:11,cc:22,bb:33} 
        console.log(aa,bb,cc) //11 33 22  和顺序无关

        // var json={
        //     'mukewang':[
        //         {
        //             'name':'hhh',
        //             'password':'h1h2h3'
        //         }
        //     ],
        //     'wangyiyun':[
        //         {
        //             'name':'www',
        //             'pas':'w1w2w3'
        //         }
        //     ]
        // }
        // var {mukewang,wangyiyun} = json;
        // console.log(wangyiyun)//{name: "www", pas: "w1w2w3"}


        // var arr = [{title:"hjt",age:18,img:"img1"}]

        // var [{title,age,img}] = arr

        // console.log(title)//hjt

        // 结构函数-返回值
        function show(){
            return {left:100,topp:200}
        }
        var {left,topp} = show();
        console.log(left, topp) //100 200

    </script>
</body>
</html>